home *** CD-ROM | disk | FTP | other *** search
- Path: dd.chalmers.se!news.chalmers.se!sunic!EU.net!sun4nl!wtrlnd!desert.wlink.nl!Jaba
- From: Jaba@desert.wlink.nl (Jan van.den.Baard)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Boopsi, layers and clipping???
- Message-ID: <Jaba.0i34@desert.wlink.nl>
- Date: 20 Mar 94 16:41:18 GMT
- Distribution: world
- Organization: Digital Desert
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-GateSoftware: AmiGate 0.16 (25.2.94)
- Lines: 53
-
- Hello Patrik,
- In a message of 19 Mar 94 you wrote about Boopsi, layers and clipping???:
-
- PL> Hello!
-
- PL> Here's a delicate problem for someone to solve!
-
- PL> What's the proper way to do clipping when rendering a boopsi-gadget?
-
- PL> I've tried the following:
-
- PL> ...
-
- PL> struct GadgetInfo *ginfo = msg->gpr_GInfo;;
- PL> struct Region *old;
-
- PL> LockLayerInfo(ginfo->gi_Layer->LayerInfo);
- PL> LockLayer(NULL, ginfo->gi_Layer);
-
- PL> old = InstallClipRegion(ginfo->gi_Layer, myclipregion);
-
- PL> ... Rendering ...
-
- PL> InstallClipRegion(ginfo->gi_Layer, old);
- PL> UnlockLayer(ginfo->gi_Layer);
- PL> UnlockLayerInfo(ginfo->gi_Layer->LayerInfo);
-
- Try this.
-
- struct GadgetInfo *ginfo = msg->gpr_GInfo;
- struct Region *old;
- BOOL update = FALSE;
-
- if ( ginfo->gi_Layer->Flags & LAYERUPDATING ) {
- EndUpdate( ginfo->gi_Layer, FALSE );
- update = TRUE;
- }
-
- old = InstallClipRegion(ginfo->gi_Layer, myclipregion);
-
- ... Rendering ...
-
- InstallClipRegion(ginfo->gi_Layer, old);
-
- if ( update )
- BeginUpdate( ginfo->gi_Layer );
-
- Bye,
- // Jaba Development
- // Fido : 2:285/404.29 (Jan van.den.Baard)
- \\ // Fido : 2:285/502.7 " " " "
- \X/ EMail: jaba@desert.wlink.nl
-